package com.chat.admin.domain.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.chat.admin.annotate.IsNumeric;
import com.chat.admin.annotate.ValidAccount;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class AdminExcelEnter {
    /**
     * 账号
     */
    @IsNumeric(message = "账号只能是数字")
    @ValidAccount(min = 6, max = 11, message = "账号长度必须在6到11之间")
    @ExcelProperty("账号")
    private String account;
    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    @Size(min = 1, max = 20)
    @ExcelProperty("用户名")
    private String username;
    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    @Size(min = 1, max = 20)
    @ExcelProperty("密码")
    private String password;
    /**
     * 角色
     */
    @IsNumeric(message = "角色是角色ID，请输入数字")
    @Min(value = 1, message = "角色ID错误")
    @ExcelProperty("角色")
    private String roleId;
}
